import request from '@/utils/request';
import store from "@/store";

const env = import.meta.env.MODE || 'development';
const prefix = '';

// 申请数（待审核数） /apiapp/v1/agent/audit_count
export function agentAuditCountApi (params) {
  return request({
    url: `${prefix}/apiapp/v1/agent/audit_count`,
    method: 'get',
    params
  });
}

// 列表 /apiapp/v1/agent/list
export function agentListApi (params) {
  return request({
    url: `${prefix}/apiapp/v1/agent/list`,
    method: 'get',
    params
  });
}

// 详情 /apiapp/v1/agent/details
export function agentDetailsApi (id, params) {
  return request({
    url: `${prefix}/apiapp/v1/agent/details?id=${id}`,
    method: 'get',
    params
  });
}

// 编辑 /apiapp/v1/agent/edit
export function agentEditApi (id, data) {
  return request({
    url: `${prefix}/apiapp/v1/agent/edit?id=${id}`,
    method: 'post',
    data
  });
}

// 审核 /apiapp/v1/agent/audit
export function agentAuditApi (id, data) {
  return request({
    url: `${prefix}/apiapp/v1/agent/audit?id=${id}`,
    method: 'post',
    data
  });
}

